<me:UIKDADR x:Class="WPFExcelReport.TKD05"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"  
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                     x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIKDADR.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter  x:Key="nbv"/>
        <ucd:NOTConverter x:Key="not"/>
        <ucd:PNumConverter x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIKDADR.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        
        <StackPanel  Grid.Row="1">       
            <WrapPanel Margin="0,5,0,0">
                <Grid Margin="10,0,0,0" Visibility="Collapsed" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="NewCommand" Height="20" Margin="5,0,0,0" Width="24" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/refresh.png" />
                        </Button.Background>
                    </Button>
                </Grid> 
                <TextBlock Text="{Binding KDAADRSL,Converter={StaticResource gb2312}}" Width="Auto" Foreground="Red"/> 
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                   
                    <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=客户名称:}}"></TextBlock>
                    <ex:TXT72 Grid.Column="1"    
                             Text="{Binding KDANAME1,ElementName=TV,Converter={StaticResource ResourceKey=gb2312}}" 
                               IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                              MaxLength="40"
                              Width="300" />
                    <ex:TXT72 Grid.Column="2"
                             Text="{Binding KDANAME2,ElementName=TV,Converter={StaticResource ResourceKey=gb2312}}" 
                               IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                              MaxLength="40"
                              Width="300" />
                </Grid>
                
            </WrapPanel>
            <WrapPanel Margin="0,5,0,0">
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=客户地址:}}"></TextBlock>
                    <ex:TXT72  Grid.Column="1"   CharacterCasing="Upper"  
                             Text="{Binding KDASTRASSE1, ElementName=TV,Converter={StaticResource ResourceKey=gb2312}}"
                               IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                              MaxLength="40"
                              Width="300" />
                    <ex:TXT72 Grid.Column="2"  
                             Text="{Binding KDASTRASSE2, ElementName=TV,Converter={StaticResource ResourceKey=gb2312}}"
                               IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                              MaxLength="40"
                              Width="300" />
                </Grid>
            </WrapPanel>
            <WrapPanel Margin="0,5,0,0">
                <Grid Margin="10,0,0,0" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=联系人:}}"></TextBlock>
                    <ex:TXT72 Grid.Column="1"   CharacterCasing="Upper"  
                             Text="{Binding KDAPOSTFACH, ElementName=TV,Converter={StaticResource ResourceKey=gb2312}}" 
                               IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                              MaxLength="15"
                              Width="100" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=手机号:}}"></TextBlock>
                    <ex:TXT72 Grid.Column="1"  CharacterCasing="Upper"  
                             Text="{Binding KDATTEX,ElementName=TV, Converter={StaticResource ResourceKey=gb2312}}" 
                               IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                              MaxLength="20"
                              Width="150" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=电话:}}"></TextBlock>
                    <ex:TXT72 Grid.Column="1"   CharacterCasing="Upper"  
                             Text="{Binding KDATEL, ElementName=TV, Converter={StaticResource ResourceKey=gb2312}}" 
                               IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                              MaxLength="20"
                              Width="120" />
                </Grid>
                <Grid Margin="10,0,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=传真:}}"></TextBlock>
                    <ex:TXT72 Grid.Column="1"   CharacterCasing="Upper"  
                             Text="{Binding KDAFAX, ElementName=TV, Converter={StaticResource ResourceKey=gb2312}}" 
                             IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                             MaxLength="20"
                             Width="120" />
                </Grid>
            </WrapPanel>
        </StackPanel>
        <WrapPanel Grid.Row="2" Visibility="Collapsed">
            <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=抬头:}}"></TextBlock>
                <TextBlock Grid.Column="1"     Text="{Binding KDAKUNDNR}" Width="Auto" />
            </Grid>
            <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=类型:}}"></TextBlock>
                <TextBlock Grid.Column="1"  Text="{Binding KDAADRSL}" Width="Auto" />
            </Grid>
        </WrapPanel>
    </Grid>
</me:UIKDADR> 
 
